<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>照片</title>
<link href="/css/base.css" type="text/css" rel="stylesheet" />
<link href="/css/manage.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/jquery.default.js"></script>
<script type="text/javascript" src="/js/jquery.validate.js"></script>
<script type="text/javascript" src="/js/jquery.form.js"></script>
<!--[if ie]><link href="/css/ie.css" type="text/css" rel="stylesheet"><![endif]-->


</head>

<body>
   <?php $this->load->view('head');?>
    <!-- head--end-->
    <?php $data['curstyle'] = 'album'?>
    <!-- body -->
    <div class="w100p mt40 mb20">
    	<div class="w903 mg">
        	<div class="box_s1">
            	<div class="b_head"></div>
                <div class="content m_pd_s1">
                	<!-- manage-top -->
                	<?php $this->load->view('member/mangtop',$data)?>
                    <!-- manage-top--end-->
                    
                    <!-- manage-det-->
                   <div class="clearfix">
                    	<div class="box_s3 fl">
                        	<div class="b_head"></div>
                            <?php $data['leftstyle'] = 'streetpiclist'?>
                            <?php $this->load->view('member/albumleft',$data)?>
                            <div class="b_foot"></div>
                        </div>
                        
                        <!-- right-ope-->
                       <div class=" m_layout_s1">
                        	<div class="m_pd_s2">
                            	<div class="form_box">
                                	<h3><a href="#" class="def_btn_s10 fr delete" id="deleteGZ">删除图片</a>恋街晒图管理</h3>
                                    <div class="form_data_box">
                                        <table class="form_list photo_street">
                                            <thead>
                                                <tr>
                                                    <th width="20"><i class="chb_s1 delete_all"></i></th><th width="210">描述</th><th width="90">图片</th><th width="110">所属街道</th><th width="80">添加用户</th><th class="tc">日期</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                            	<?php foreach ($photoList as $photo):?>
                                            		  <tr>
	                                                    <td><i class="chb_s1 delete_item" dataid="<?php echo $photo['id']?>" datavalue="<?php echo $photo['id']?>"></i><input type="hidden" /></td><td><a href="#" class="describe"><?php echo $photo['desc']?></a></td><td><img src="<?php echo site_url($photo['imagePath'])?>" width="40" height="27" class="pic block" /></td><td><span class="belong"><?php echo $photo['name']?></span></td><td><span class="add"><?php echo $photo['creator']?></span></td><td class="tc">2012-03-03</td>
	                                                </tr>
                                            	<?php endforeach;?>
                                              
                                               

                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div class="btn_fy">
                                	<?php echo $this->pagination->create_links()?>
                                </div>
                            </div>
                        </div>
                        <!-- right-ope--end-->
                        
                        <div class="clear"></div>
                    </div>
                    <!-- manage-det--end-->
                    
                </div>
                <div class="b_foot"></div>
            </div>
        </div>
    </div>
    <!-- body--end-->
    
    <!-- foot-->
   <?php $this->load->view('foot')?>
    <!-- foot--end-->	
</body>
<script type="text/javascript">
$(function(){
	$("#deleteGZ").click(function(){
		if($(".delete_chb").size() < 1){
			alert("请选择要删除的相册");
			return ;
		}
		if(confirm("你确定要删除相册吗？")){
			$(".delete_chb").each(function(){
				var obj = $(this);
				var albumId = $(this).attr("idatavalue");
				$.post("<?php echo site_url('member/photodel')?>",{
						albumId:albumId
					},function(data){
						var ret = $.parseJSON(data);
						if(ret.success=='true'){
							window.location.href='<?php echo site_url('member/streetpiclist')?>';
						}else{
							alert(ret.msg);
						}
						
					});
				
			});
		}
	});
	
});
</script>
</html>
